<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-member-edit" th:object="${member}">
            <input name="ID" th:field="*{ID}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">客户姓名：</label>
                <div class="col-sm-8">
                    <input name="NAME" th:field="*{NAME}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">客户电话：</label>
                <div class="col-sm-8">
                    <input name="PHONE" th:field="*{PHONE}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户住址：</label>
                <div class="col-sm-8">
                    <input name="ADDRESS" th:field="*{ADDRESS}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">注册时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="regestTime" th:value="${#dates.format(member.regestTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最后活跃时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="lastActiveTime" th:value="${#dates.format(member.lastActiveTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户生日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="BIRTHDAY" th:value="${#dates.format(member.BIRTHDAY, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">客户渠道：</label>
                <div class="col-sm-8">
                    <select name="CHANNEL" class="selectpicker form-control" th:field="*{CHANNEL}">
                        <option value="1">管理员添加</option>
                        <option value="2">微信注册</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "member";
        $("#form-member-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
            }
        }

        $("input[name='regestTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='lastActiveTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='BIRTHDAY']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>